import countdownProtocol.CountdownClient;
import countdownProtocol.CountdownServer;


public class TestMain
{

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		if(args.length == 3)
		{
			int loops = Integer.parseInt(args[0]);
			int port = Integer.parseInt(args[1]);
			String host = args[2];
			
			CountdownServer cs = new CountdownServer(port);
			CountdownClient cc = new CountdownClient(loops, port, host);
			
			try
			{
				cc.join();
				cs.join();
				
				cs.start();
				cc.start();
			} catch (InterruptedException e)
			{
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		}
		else
		{
			System.out.println("Ususage is csc583_lab10a [number] [port] [host]");
		}

	}

}
